/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.gitee.fdc.dubbo.rest;

import com.gitee.fdc.dubbo.consummer.GreetingServiceConsumer;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @note "your words about this class"
 * @author FanDangChun <fdc_messenger@126.com>
 * @date 2019-5-24 9:43:29
 */
@Api(value = "测试服务")
@RestController

@RequestMapping("/demo")
public class GreetingController {

//    @Reference
//    private GreetingsService greetingService;
    @Autowired
    GreetingServiceConsumer csmer;

    @ApiOperation("打招呼接口")
//    @ApiResponses({
//        @ApiResponse(code = 200, message = "data中为返回的验证码，也就是要发到用户手机上的验证码")
//    })
    @GetMapping("/sayHi")
    public String verifycode(@ApiParam(name = "name", value = "名字", required = true, type = "String") @RequestParam String name) {
        return this.csmer.doSayHello(name);
    }

}
